package com.live.video.util;

import com.github.pagehelper.PageInfo;

/**
 * User: dai
 * Date: 2017/5/4
 * Time: 15:46
 * Description:原生的PageInfo内容太多，格式化出自己需要的字段
 */
public class MyPageInfoUtil {
    public static MyPageInfo parse(PageInfo pageInfo) {
        MyPageInfo mpi = new MyPageInfo();
        mpi.setList(pageInfo.getList());
        mpi.setPageNum(pageInfo.getPageNum());
        mpi.setPages(pageInfo.getPages());
        mpi.setPageSize(pageInfo.getPageSize());
        mpi.setTotal(pageInfo.getTotal());
        return mpi;
    }
}
